package com.example.sjly.ui.scheduling;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;

import com.example.sjly.R;

public class SchedulingFragment extends Fragment {

    private Button choiceButton;
    private Button personButton;
    private Button nextButton;

    private SchedulingViewModel schedulingViewModel;
    public View onCreateView(@NonNull LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {
     schedulingViewModel =
                new ViewModelProvider(this).get(SchedulingViewModel.class);
        View root = inflater.inflate(R.layout.fragment_scheduling, container, false);

        choiceButton=root.findViewById(R.id.messchoicebutton);
        choiceButton.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent=new Intent(getActivity(),SchedulingDatamess.class);
                startActivity(intent);
            }
        });
        personButton=root.findViewById(R.id.messorderbutton);
        personButton.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent=new Intent(getActivity(),Schedulingmessgather.class);
                startActivity(intent);
            }
        });
        nextButton=root.findViewById(R.id.nextstepbutton);
        nextButton.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent intent=new Intent(getActivity(),Schedulingaffirmorder.class);
                startActivity(intent);
            }
        });
      return root;}
}